import request from './request'
// 获取角色列表
export const getRoles = ()=>request.get('/roles');
// 添加
export const addRoles = (params)=>request.post('/roles',params)
// 修改
export const changeRoles = (id,params)=>request.put(`/roles/${id}`,params)
// 删除
export const delRoles = (id)=>request.delete(`/roles/${id}`)
// 权限
export const setRights = (roleId,rids) => request.post(`/roles/${roleId}/rights`,{rids})
// 删除角色
export const delRights = ( roleId,rightId ) => request.delete(`/roles/${roleId}/rights/${rightId}`)